package com.app.controller.backstage;

import com.app.common.Result;
import com.app.service.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Controller
@RestController
@RequestMapping("/admin/system")
public class SystemController {
    @Autowired
    private SystemService systemService;

    //积分规则配置
    @GetMapping("/integralConfig")
    public Result<Object> integralConfig(Integer integral) {
        if (integral == null) {
            return Result.success(systemService.integralConfig());
        }
        return Result.success(systemService.integralConfig(integral));
    }
}
